FROM golang:1.22.6-alpine

ADD ./env.yaml /go/src/app
COPY user_service /go/src/app/

WORKDIR /go/src/app/user_service


RUN cd /go/src/app/user_service GOPROXY=https://goproxy.cn,direct GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -v -o /go/src/app/user_service/userservice

CMD ["./userservice"]
